import Vue from 'vue';
import { ToastPlugin, ConfirmPlugin, AlertPlugin } from 'vux';
import infiniteScroll from 'vue-infinite-scroll';
import '@/styles/main.scss';
import App from './App';
import router from './router';
import store from './store';
import * as filters from './util/filters';

Vue.use(ToastPlugin);
Vue.use(infiniteScroll);
const FastClick = require('fastclick');

Vue.config.productionTip = false;

window.AUDIO = new Audio();
Vue.use(ToastPlugin);
Vue.use(ConfirmPlugin);
Vue.use(AlertPlugin);
FastClick.attach(document.body);

Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key]);
});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
});
